removeEventListener

abstract fun removeEventListener(eventType: EventType, listener: Observer<Event>, useCapture: Boolean)

Removes the given listener from the event target.

You can use one of the predefined event types provided by the EventType class as an eventType parameter or create it manually through the of, for example:

EventType.of("click");
If the event target has no added listeners of the given eventType, returns an empty collection.

Parameters

eventType

the type of the event

listener

the event listener instance to remove

useCapture

a flag indicating that events of the given eventType will be dispatched to the given listener before being dispatched to any other EventTarget beneath it in the DOM tree. Events that are bubbling upward through the tree will not trigger the listener

Throws

when the document this instance belongs to is closed